﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>KindEditor</title>
    <style type="text/css">
    body
    {
        font-size:13px;
    }
    </style>
</head>
<body>

    <h1>KindEditor</h1>
    <p>KindEditor 是一套开源的在线HTML编辑器，主要用于让用户在网站上获得所见即所得编辑效果，开发人员可以用 KindEditor 把传统的多行文本输入框(textarea)替换为可视化的富文本输入框。 </p>
    <p>官方网站：<a href="http://www.kindsoft.net/">http://www.kindsoft.net/</a></p>
    <p>文件下载地址:<a href="http://www.kindsoft.net/down.php">http://www.kindsoft.net/down.php</a></p>
    <input type="button" value="OpenWindow" onclick="showWindow();"/>
    <div id="win1" class="mini-window" title="KindEditor" style="width:480px;height:350px;" 
        showModal="true" allowResize="true" bodyStyle="overflow:hidden;"
        >
        <!--body-->
        <textarea id="ke" name="content" style="width:100%;height:250px;visibility:hidden;">
            <a href="http://www.kindsoft.net" target="_blank">http://www.kindsoft.net</a>

        </textarea>
        <div style="text-align:center;padding:8px;">
            <input type="button" value="setText" onclick="setText();"/>
            <input type="button" value="getText" onclick="getText();"/>
        </div>
    </div>        

</body>
</html>


<script src="../../scripts/boot.js" type="text/javascript"></script> 



<script src="http://www.kindsoft.net/ke4/kindeditor-min.js?20120115.js" type="text/javascript"></script>
<script type="text/javascript">
    mini.parse();
    var editorId = "ke";
    function showWindow() {
        var win = mini.get("win1");
        win.show();
    }
    showWindow();


    function setText() {
        var text = "<b>KindEditor</b> <br/>Date:" + new Date().getTime();
        editor.html(text);
    }
    function getText() {
        var text = editor.html();
        alert(text);
    }

    //-------------------------------------------------------------
    var editor = null;
    setTimeout(function () {
        editor = KindEditor.create('#' + editorId, {
            resizeType: 1,
            uploadJson: 'kindeditor/upload_json.ashx',
            fileManagerJson: 'kindeditor/file_manager_json.ashx',
            allowPreviewEmoticons: false,
            allowImageUpload: true,
            items: [
		    'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
		    'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
		    'insertunorderedlist', '|', 'emoticons', 'image', 'link']
        });
    }, 1);

 
</script>